<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.fnst.caesar.bean.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导入上课人员名单</title>
<link href="css/body.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.bg_div {
	width:600px;
	position:relative;;
	margin-left:-300px;
	left:50%;
}

</style>
</head>

<body>
<br />
<div class="bg_div">
<fieldset>
    	<legend>导入上课人员</legend>
    <br />
    <span style="margin-left:20px">请选择要导入的xls文件,并点击“提交”按钮</span><br /><br />
    <form action="importStudent?excel=1" method="post" enctype="multipart/form-data">
    <input name="excelImported" type="file" id="excelImported" size="30" style="margin-left:40px"/>
    &nbsp;
&nbsp;
<input type="submit" name="button" id="button" value="提交" />
</form>

<br />
</fieldset>
    </div>
<%
	String error = (String)request.getAttribute("error")+"";
	List<ApplyInfo_Bean> invalid = (List<ApplyInfo_Bean>)request.getAttribute("badList");
	if(error.equals("1"))
	{
		out.println("错误的文件类型，请重新选择文件！");
	}
	else
	{
		if(error.equals("2"))
		{
			out.println("系统遇到故障，请稍后再试");
		}
	}
	if(invalid != null && !invalid.isEmpty())
	{
		for(ApplyInfo_Bean tmp:invalid)
		{
			out.println("工号"+tmp.getUser_id()+" 姓名为"+tmp.getUser_name()+"的学生导入失败，数据库中未找到此人，请确认此人是本公司员工！");
			out.println("<br/>");
		}
	}
	
%>
</body>
</html>
